# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>

pkgname=python-openstackdocstheme
pkgver=3.1.0
_commit=20bf587d68f6c1794168f2ad467c9c55daf074e5
pkgrel=2
pkgdesc="Open Infrastructure Projects Sphinx Themes"
arch=('any')
url="https://opendev.org/openstack/openstackdocstheme"
license=('Apache')
depends=('python-pbr' 'python-dulwich' 'python-sphinx')
makedepends=('git' 'python-setuptools')
options=('!emptydirs')
source=("git+https://github.com/openstack/openstackdocstheme.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd openstackdocstheme
  python setup.py build
  PYTHONPATH="$PWD/build/lib" sphinx-build -W -b man doc/source doc/build/man
}

package() {
  cd openstackdocstheme
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 doc/build/man/*.1 -t "$pkgdir"/usr/share/man/man1/
}
